
<?php 
if(!empty($data)){
    foreach($data as $data){
        echo '
        <div class="cat_box left">
                        <h2 class="block"><a href="'.base_url().$data->alias.'.1.html">'.$data->title.'</a></h2>
                        <ul class="left span175">';
                        if(!empty($product[$data->id])){
                            foreach($product[$data->id] as $prod){
                                echo '
                                <li><a href="'.base_url().$prod->alias.'.8.html">'. character_limiter($prod->title,10).'</a></li>
                                ';
                            }
                        }  
                        echo '
                        </ul>
                        <a href="'.base_url().$data->alias.'.1.html">
                        <img class="right" src="'.$data->image.'"/> 
                        </a>                   
        </div>
        
        ';
    }
}

?>
